<?php
namespace App\Http\Controllers;


use App\Models\Enum;
use Dingo\Api\Http\Request;

class EnumController extends BaseController
{

    public function index(Request $request) {
        $key = $request->input('key');
        $list = Enum::when($key, function ($q) use($key) {
            $q->where('key', $key);
        })->paginate(999);
        return $this->paginate($list);
    }

}